package com.library.dto;

import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class BookDTO {
    private Long id;
    
    @NotBlank(message = "书名不能为空")
    private String title;
    
    @NotBlank(message = "作者不能为空")
    private String author;
    
    @NotBlank(message = "ISBN不能为空")
    private String isbn;
    
    private String publisher;
    
    @NotNull(message = "出版年份不能为空")
    private Integer publishYear;
    
    private String category;
    private String description;
    
    @NotNull(message = "库存数量不能为空")
    private Integer stock;
}
